package com.open.capacity.db.feign.impl;

import com.open.capacity.common.model.DB;
import com.open.capacity.common.model.DBTable;
import com.open.capacity.db.feign.FireBirdFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class FireBirdFeignClientFallback  implements FallbackFactory<FireBirdFeignClient> {
    @Override
    public FireBirdFeignClient create(Throwable throwable) {
        return db -> {
            log.error("firebird-center服务异常" + throwable);
            return null;
        };
    }
}
